import numpy as np
from typing import List

class HE:
    def __init__(self):
        pass

    def encrypt(self, pk: str, array: List[float]) -> List[float]:
        """Encrypts an array using the public key."""
        # Placeholder: Replace with actual encryption logic
        return [x + 1 for x in array]

    def decrypt(self, sk: str, cipher: List[float]) -> List[float]:
        """Decrypts a cipher using the secret key."""
        # Placeholder: Replace with actual decryption logic
        return [x - 1 for x in cipher]

    def add(self, cipher1: List[float], cipher2: List[float]) -> List[float]:
        """Adds two encrypted arrays."""
        return [x + y for x, y in zip(cipher1, cipher2)]

    def mul(self, cipher1: List[float], cipher2: List[float]) -> List[float]:
        """Multiplies two encrypted arrays."""
        return [x * y for x, y in zip(cipher1, cipher2)]